package ar.edu.unlp.info.tesis.database.operator;

public class OrderParam {

	String field;

	boolean ascendent = true;

	public boolean isAscendent() {
		return ascendent;
	}

	public void setAscendent(boolean ascendent) {
		this.ascendent = ascendent;
	}

	public String getField() {
		return field;
	}

	public void setField(String field) {
		this.field = field;
	}

	public String getKeyHqlString() {
		if (this.isAscendent())
			return " ASC ";
		return " DESC ";
	}

	public OrderParam(boolean ascendent, String field) {
		super();
		this.ascendent = ascendent;
		this.field = field;
	}
}
